<form action="/tasks" method="POST">
    @csrf
    @method('PUT')
    <label for="name">Task name</label>
    <input type="text" name="name" id="name" class="@error('name') is-invalid @else is-valid @enderror" value="{{ $task->name }}">
    <button type="submit">Update</button>
</form>